<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>error</title>
    <script src = 'jquery-1.12.4.min.js'></script>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .bord{
            border: 1px dashed #ee2602;
            width: 90%;
            margin: 20px auto;
        }
        .title{
            font-size: 20px;
            font-weight: bold;
            margin: 20px;
        }
        .introduce{
            font-size: 16px;
            margin: 0 0 20px 50px;
        }
        .red{
            color: red;
        }
    </style>
    <script>
        jQuery(function ($) {
            $(window).error(function () {
                return true;
            })
        });
    </script>
</head>
<body>
<div class="bord">
    <div class="title">error</div>
    <div class="introduce">当元素遇到错误（没有正确载入）时，发生 error 事件。</div>
</div>
<div class="bord">
    <div class="title">演示效果</div>
    <div class="introduce">
        <button id="mybtn">双击点击事件</button>
    </div>
</div>
<div class="bord">
    <div class="title">代码</div>
    <div class="introduce">
            <pre>
&lt;script&gt;
    jQuery(function ($) {
        $('.mybtn').<a class="red">dblclick</a> (function () {
            $(this).css({backgroundColor:'red'})
        })
    });
&lt;/script&gt;
&lt;html&gt;
    &lt;button class="mybtn"&gt;点击事件&lt;/button&gt;
&lt;/html&gt;
            </pre>
    </div>
</div>
</body>